Re: [NTG-context] XML: calculations on attribute values before output

2022-05-05 Thread Duncan Hothersall via ntg-context
ibutes are just in a table entry of the argument node t ( t.at ): > > set up a lua function in the setups: > > \startxmlsetups xml:demo:base > \xmlsetsetup{#1}{*}{xml:demo:*} > \xmlsetfunction {\xmldocument}{entry}{userdata.xmlfunctions.entry} > \stopxmlsetups > > and then add this lua

Re: [NTG-context] XML: calculations on attribute values before output

2022-05-05 Thread Taco Hoekwater via ntg-context
lso be great!) Not CALS, but I do a lot of HTML table processing. I find it all much easier on the lua side, because there the attributes are just in a table entry of the argument node t ( t.at ): set up a lua function in the setups: \startxmlsetups xml:demo:base \xmlsetsetup{#1

Re: [NTG-context] xml in lua advice ?

2018-09-19 Thread Taco Hoekwater
nction xml.functions.b(t) context.start() context.bf() lxml.flush(t) context.stop() context("{}") end function xml.functions.section(t) context.section("{") lxml.flush(t) context("}") end \stopluacode \startxmlsetups mysetups % to be co

Re: [NTG-context] processing style inside verbatim in XML

2011-10-24 Thread Hans Hagen
which displays fine in my browser, and it should look similar with ConTeXt. I have problems with literal typesetting ofspan class=... (that should have applied style instead), but maybe I only have wrong settings in my parser. When I use \xmlsetfunction{main}{pre}{lxml.displayverbatim}, then I

[NTG-context] processing style inside verbatim in XML

2011-10-21 Thread Mojca Miklavec
, and it should look similar with ConTeXt. I have problems with literal typesetting of span class=... (that should have applied style instead), but maybe I only have wrong settings in my parser. When I use \xmlsetfunction{main}{pre}{lxml.displayverbatim}, then I cannot color the numbers. When I use

Re: [NTG-context] DocBook in ConTeXt - any new ideas?

2011-06-05 Thread Hans Hagen
in docbook they embed the cals model, so it's not used as an independent definition). When in x-cals.lua the following is used in line 128 local prefix = namespace and namespace ~= and (namespace .. :) or one can do this then: \startxmlsetups xml:cals:nonamespace \xmlsetfunction

Re: [NTG-context] HTML to Context with Regular Expressoin

2007-12-17 Thread Mojca Miklavec
can anly compile it with texexec --lua filename.tex. Mojca \startxmlsetups all:html \xmlsetsetup{main}{head|h1|h2|p|span|sub|table|b|tt|ul|li|div|img}{*} %\xmlsetfunction{main}{pre}{lxml.displayverbatim} %\xmlsetfunction{main}{verb}{lxml.inlineverbatim} \stopxmlsetups

Re: [NTG-context] How to process simple HTML files with LuaTeX

2007-10-01 Thread Mojca Miklavec
? With \ignorespaces? - How to use the new verbatim code? I have tried to use \xmlsetfunction{main}{pre}{lxml.verbatim} but it didn't really work. % test.tex: \startxmlsetups all:html \xmlsetsetup{main}{h1|pre}{*} \stopxmlsetups \xmlregistersetup{all:html} % is this the proper way